package com.shop.common.enums.user;

import lombok.Getter;

/**
 * 收入类型
 */
@Getter
public enum BillTypeEnum {

    JISHOUTOBALANCE(0, "寄售转余额"),
    EXPEND(1, "支出"),
    ;

    private int key;
    private String name;

    BillTypeEnum(int key, String name) {
        this.key = key;
        this.name = name;
    }

    public static BillTypeEnum val(int key) {
        for (BillTypeEnum enumObj : BillTypeEnum.values()) {
            if(enumObj.key == key) {
                return enumObj;
            }
        }
        return null;
    }
}
